package com.koi.system.enums;

import com.koi.common.enums.common.IResultEnum;

/**
 * @author ･ᴗ･
 * @description [接口重载实现枚举]
 */
public enum ResultStatusEnumA implements IResultEnum {
    TOKEN_KOI_EMPTY_EXPIRED("999", IResultEnum.LOGIN, "Token为空或长时间未登录，请重新登录!"),

    LOGIN_USER_PWD_STATUS("001", IResultEnum.LOGIN, "用户密码有误"),
    LOGIN_USER_USERNAME_STATUS("002", IResultEnum.LOGIN, "请输入用户名"),
    LOGIN_USER_PWD_STATUS_INPUT("003", IResultEnum.LOGIN, "请输入密码"),
    LOGIN_USER_CODE_STATUS_INPUT("004", IResultEnum.LOGIN, "请输入验证码"),
    LOGIN_USER_CODE_INPUT_ERROR("005", IResultEnum.LOGIN, "验证码输入有误"),
    LOGIN_USER_CODE_ERROR_CACHE("006", IResultEnum.LOGIN, "缓存验证码为空"),
    LOGIN_TOKEN_EMPTY("007", IResultEnum.LOGIN, "Token不能为空!"),
    LOGIN_TOKEN_EMPTY_EXPIRED("008", IResultEnum.LOGIN, "Token已过期，请重新登录!"),
    LOGIN_TOKEN_USER_EMPTY("009", IResultEnum.LOGIN, "用户不存在!"),
    LOGIN_TOKEN_UN_VALID("010", IResultEnum.LOGIN, "Token无效!");

    public static final String LOGIN = "100"; // 登录
    public static final String USER = "101"; // 用户
    public static final String ROLE = "102"; // 角色
    public static final String PERMISSION = "103"; // 菜单
    public static final String DEPT = "104"; // 部门
    public static final String POST = "105"; // 岗位
    public static final String LOGIN_LOG = "106"; // 登录日志
    public static final String OPER_LOG = "107"; // 操作日志

    // A = "101" 前台系统
    // B = "202" APP系统
    ResultStatusEnumA(String status, String moduleCode, String message) {
        this.status = Integer.parseInt(IResultEnum.A.concat(moduleCode).concat(status)); // A -> 101+100+999
        this.message = message;
    }

    private int status;
    private String message;

    @Override
    public int status() {
        return this.status;
    }

    @Override
    public String message() {
        return this.message;
    }
}
